<?php if(!defined('IN_UCHOME')) exit('Access Denied');?><?php subtplcheck('admin/tpl/task|admin/tpl/header|admin/tpl/side|admin/tpl/footer', '1229953589', 'admin/tpl/task');?><?php $_TPL['menunames'] = array(
		'index' => '管理首页',
		'config' => '站点设置',
		'privacy' => '隐私设置',
		'usergroup' => '用户组',
		'credit' => '积分规则',
		'profilefield' => '用户栏目',
		'profield' => '群组栏目',
		'task' => '有奖活动',
		'spam' => '防灌水设置',
		'censor' => '词语屏蔽',
		'ad' => '广告设置',
		'sitefeed' => '全局动态',
		'userapp' => 'MYOP应用',
		'app' => 'UCenter应用',
		'network' => '随便看看设置',
		'cache' => '缓存更新',
		'space' => '用户',
		'name' => '实名认证',
		'feed' => '事件',
		'share' => '分享',
		'blog' => '日志',
		'album' => '相册',
		'pic' => '图片',
		'comment' => '评论',
		'thread' => '话题',
		'post' => '回帖',
		'doing' => '记录',
		'tag' => '标签',
		'mtag' => '群组',
		'report' => '举报管理',
		'block' => '数据调用',
		'template' => '模板编辑',
		'backup' => '数据备份',
		'stat' => '统计更新',
		'cron' => '系统计划任务'
	); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?=$_SC['charset']?>" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title><?php if($_TPL['titles']) { ?><?php if(is_array($_TPL['titles'])) { foreach($_TPL['titles'] as $value) { ?><?php if($value) { ?><?=$value?> - <?php } ?><?php } } ?><?php } ?><?php if($space) { ?><?=$_SN[$space['uid']]?> - <?php } ?><?=$_SCONFIG['sitename']?> - Powered by UCenter Home</title>
<script language="javascript" type="text/javascript" src="source/script_common.js"></script>
<script language="javascript" type="text/javascript" src="source/script_menu.js"></script>
<script language="javascript" type="text/javascript" src="source/script_ajax.js"></script>
<script language="javascript" type="text/javascript" src="source/script_face.js"></script>
<script language="javascript" type="text/javascript" src="source/script_manage.js"></script>
<style type="text/css">
@import url(template/<?=$_SC['template']?>/style.css);
@import url(admin/tpl/style.css);
</style>
<link rel="shortcut icon" href="image/favicon.ico" />
</head>
<body>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>

<div id="header">
<div class="headerwarp">
<h1 class="logo"><a href="index.php"><img src="<?=$_SCONFIG['sitelogo']?>" alt="<?=$_SCONFIG['sitename']?>" /></a></h1>
<ul class="menu">
<li><a href="space.php?do=home">首页</a></li>
<li><a href="space.php">个人主页</a></li>
<li><a href="space.php?do=friend">好友</a></li>
<li><a href="network.php">随便看看</a></li>

<?php if($_SGLOBAL['appmenu']) { ?>
<?php if($_SGLOBAL['appmenus']) { ?>
<li class="ucmenu" onmouseover="subop(this)" onmouseout="subop(this)" >
<a href="<?=$_SGLOBAL['appmenu']['url']?>" title="<?=$_SGLOBAL['appmenu']['name']?>" target="_blank"><?=$_SGLOBAL['appmenu']['name']?></a>
<ul id="ucmenu" style="display:none;">
<li><a href="<?=$_SGLOBAL['appmenu']['url']?>" title="<?=$_SGLOBAL['appmenu']['name']?>" target="_blank"><?=$_SGLOBAL['appmenu']['name']?></a></li>
<?php if(is_array($_SGLOBAL['appmenus'])) { foreach($_SGLOBAL['appmenus'] as $value) { ?>
<li><a href="<?=$value['url']?>" title="<?=$value['name']?>" target="_blank"><?=$value['name']?></a></li>
<?php } } ?>
</ul>
</li>
<?php } else { ?>
<li><a href="<?=$_SGLOBAL['appmenu']['url']?>" title="<?=$_SGLOBAL['appmenu']['name']?>" target="_blank"><?=$_SGLOBAL['appmenu']['name']?></a></li>
<?php } ?>
<?php } ?>

<li><a href="space.php?do=pm">消息<?php if(!empty($_SGLOBAL['member']['newpm'])) { ?>(新)<?php } ?></a></li>
<?php if(!empty($_SGLOBAL['member']['notenum'])) { ?><li class="notify"><a href="space.php?do=notice"><?=$_SGLOBAL['member']['notenum']?>条新通知</a></li><?php } ?>
</ul>

<div class="nav_account">
<a href="space.php?uid=<?=$_SGLOBAL['supe_uid']?>" class="login_thumb"><img src="<?php echo avatar($_SGLOBAL[supe_uid],small); ?>" alt="<?=$_SN[$_SGLOBAL['supe_uid']]?>" width="20" height="20" /></a>
<a href="space.php?uid=<?=$_SGLOBAL['supe_uid']?>" class="loginName"><?=$_SN[$_SGLOBAL['supe_uid']]?></a>
<?php if($_SN[$_SGLOBAL['supe_uid']]!=$_SGLOBAL['username']) { ?>(<?=$_SGLOBAL['supe_username']?>)<?php } ?>
<br />
<a href="cp.php?ac=invite">邀请</a> | <a href="cp.php">设置</a> | <a href="cp.php?ac=privacy">隐私</a> | <a href="cp.php?ac=common&op=logout">退出</a>
</div>
</div>
</div>

<div id="wrap">
<div id="cp_content">


<div class="mainarea">
<div class="maininner">

<form method="post" action="admincp.php?ac=task&taskid=<?=$taskid?>">
<input type="hidden" name="formhash" value="<?php echo formhash(); ?>" />
<div class="bdrcontent">
通过有奖活动，您可以实现引导站内的新人更好的完善自己的头像、资料和发表信息；还可以实现在节日期间给用户发送积分；用户定期领取积分红包等各种活动。有奖活动可以带动用户更容易的融入到站内的气氛中来。
</div>
<br>

<div class="bdrcontent">
<div class="topactions">
<a href="admincp.php?ac=task">浏览</a> | <a href="admincp.php?ac=task&op=add">添加</a>
</div>

<?php if($_GET['op']=='edit' || $_GET['op']=='add') { ?>

<table cellspacing="0" cellpadding="0" class="formtable">
<tr>
<th style="width:12em;">有奖活动名</th>
<td><input size="25" name="name" value="<?=$thevalue['name']?>" type="text">
</td>
</tr>
<tr>
<th>有奖活动图片</th>
<td><input size="100" name="image" value="<?=$thevalue['image']?>" type="text"><br>输入有奖活动图片的URL地址，不要太大，建议长60px，宽60px的小图片
</td>
</tr>
<tr>
<th>有奖活动说明</th>
<td><textarea name="note" rows="8" style="width:90%;"><?=$thevalue['note']?></textarea>
<br>支持html代码，文字换行请使用&lt;br&gt;标签。
</td></tr>
<tr>
<th>有奖活动奖励积分</th>
<td><input type="text" name="credit" value="<?=$thevalue['credit']?>" size="10">
<br>设置用户完成该有奖活动后可以获得的积分奖励。为0，则不奖励积分。
</td>
</tr>
<tr>
<th>有奖活动完成数限制</th>
<td><input type="text" name="maxnum" value="<?=$thevalue['maxnum']?>" size="10">
<br>设置该有奖活动最多可完成多少人次。超过该人次后，该有奖活动将自动失效。为0，则不限制。
<?php if($thevalue['num']) { ?><br><b>目前该有奖活动已经完成 <?=$thevalue['num']?> 人次</b>。<?php } ?>
</td>
</tr>
<tr>
<th>有奖活动处理PHP脚本</th>
<td>./source/task/<input size="25" name="filename" value="<?=$thevalue['filename']?>" type="text">
<br>不能包含路径，程序脚本必须存放于 ./source/task/ 目录中
<br>本功能为高级应用，有奖活动脚本的编写，需要您懂一定PHP知识。
<br>请参考系统自带的有奖活动脚本 ./source/task/sample.php 中的说明来编写。
</td></tr>
<tr>
<th>有效性</th>
<td><input type="radio" name="available" value="1"<?=$availables['1']?>>有效 <input type="radio" name="available" value="0"<?=$availables['0']?>>无效
</td>
</tr>
<tr>
<th>开始日期</th>
<td><input type="text" name="starttime" value="<?=$thevalue['starttime']?>" size="25"> (格式：2008-08-08 00:00:00)
<br>设置该有奖活动开始的日期。为空为立即开始。
</td>
</tr>
<tr>
<th>结束日期</th>
<td><input type="text" name="endtime" value="<?=$thevalue['endtime']?>" size="25"> (格式：2008-08-08 23:59:59)
<br>设置该有奖活动结束的日期。为空为永久有效。
</td>
</tr>
<tr>
<th>用户重复执行周期</th>
<td><input type="text" name="nexttime" value="<?=$thevalue['nexttime']?>" size="10"> (单位：秒，1小时为3600，1天为86400)
<br>设置允许用户多长时间后可以重新执行该有奖活动。为0，则只允许用户执行一次。
</td>
</tr>
<tr>
<th>优先顺序</th>
<td><input type="text" name="displayorder" value="<?=$thevalue['displayorder']?>" size="10"><br>数字越小，排序越靠前，优先级越高
</td>
</tr>
</table>

</div>
<div class="footactions">
<input type="submit" name="tasksubmit" value="提交" class="submit">


<?php } else { ?>
<table cellspacing="0" cellpadding="0" class="formtable">
<tr>
<th width="80">图片</th>
<th>有奖活动名/有奖活动脚本</th>
<th>积分奖励</th>
<th>有效期</th>
<th>操作</th>
</tr>
<?php if(is_array($list)) { foreach($list as $task) { ?>
<tr>
<td><img src="<?=$task['image']?>" width="60" height="60"></td>
<td><?=$task['name']?><br><?=$task['filename']?></td>
<td><?=$task['credit']?></td>
<td><?php if($task['available']) { ?><?=$task['starttime']?><br><?=$task['endtime']?><?php } else { ?>无效<?php } ?></td>
<td><a href="admincp.php?ac=task&op=edit&taskid=<?=$task['taskid']?>">编辑</a>
&nbsp;|&nbsp;<a href="admincp.php?ac=task&op=delete&taskid=<?=$task['taskid']?>">删除</a>
</td>
</tr>
<?php } } ?>
</table>

<?php } ?>

</div>
</form>

</div>
</div>

<div class="side">
<?php if($menus['0']) { ?>
<div class="block style1">
<h2>基本设置</h2>
<ul class="folder">
<?php if(is_array($acs['0'])) { foreach($acs['0'] as $value) { ?>
<?php if($menus['0'][$value]) { ?>
<?php if($ac==$value) { ?><li class="active"><?php } else { ?><li><?php } ?><a href="admincp.php?ac=<?=$value?>"><?=$_TPL['menunames'][$value]?></a></li>
<?php } ?>
<?php } } ?>
</ul>
</div>
<?php } ?>

<div class="block style1">
<h2>批量管理</h2>
<ul class="folder">
<?php if(is_array($acs['3'])) { foreach($acs['3'] as $value) { ?>
<?php if($ac==$value) { ?><li class="active"><?php } else { ?><li><?php } ?><a href="admincp.php?ac=<?=$value?>"><?=$_TPL['menunames'][$value]?></a></li>
<?php } } ?>
<?php if(is_array($acs['1'])) { foreach($acs['1'] as $value) { ?>
<?php if($menus['1'][$value]) { ?>
<?php if($ac==$value) { ?><li class="active"><?php } else { ?><li><?php } ?><a href="admincp.php?ac=<?=$value?>"><?=$_TPL['menunames'][$value]?></a></li>
<?php } ?>
<?php } } ?>
</ul>
</div>

<?php if($menus['2']) { ?>
<div class="block style1">
<h2>高级应用</h2>
<ul class="folder">
<?php if(is_array($acs['2'])) { foreach($acs['2'] as $value) { ?>
<?php if($menus['2'][$value]) { ?>
<?php if($ac==$value) { ?><li class="active"><?php } else { ?><li><?php } ?><a href="admincp.php?ac=<?=$value?>"><?=$_TPL['menunames'][$value]?></a></li>
<?php } ?>
<?php } } ?>
<?php if($menus['0']['config']) { ?><li><a href="<?=UC_API?>" target="_blank">UCenter</a></li><?php } ?>
</ul>
</div>
<?php } ?>
</div>

</div>

<div id="footer" title="<?php echo debuginfo(); ?>">

<p class="r_option">
<a href="javascript:;" onclick="window.scrollTo(0,0);" id="a_top" title="TOP">TOP</a>
</p>

<?php if($_SGLOBAL['ad']['footer']) { ?>
<p style="padding:5px 0 10px 0;"><?php adshow('footer'); ?></p>
<?php } ?>

<p>
<?=$_SCONFIG['sitename']?> - 
<a href="mailto:<?=$_SCONFIG['adminemail']?>">联系我们</a>
<?php if($_SCONFIG['miibeian']) { ?> - <a  href="http://www.miibeian.gov.cn" target="_blank"><?=$_SCONFIG['miibeian']?></a><?php } ?>
</p>
<p>
Powered by <a  href="http://u.discuz.net" target="_blank"><strong>UCenter Home</strong></a> <span title="<?php echo X_RELEASE; ?>"><?php echo X_VER; ?></span>
<?php if(!empty($_SCONFIG['licensed'])) { ?><a  href="http://license.comsenz.com/?pid=7&host=<?=$_SERVER['HTTP_HOST']?>" target="_blank">Licensed</a><?php } ?>
&copy; 2001-2008 <a  href="http://www.comsenz.com" target="_blank">Comsenz Inc.</a>
</p>
</div>
</div>
<!--/wrap-->

</body>
</html><?php ob_out();?>